package pya;

import java.util.Scanner;
import java.util.Arrays;

class Rectangle
{
	private int width;
	private int length;
	
	public int getWidth()
	{
		return width;
	}
	
	public void setWidth(int width)
	{
		this.width=width;
	}
	
	public int getLength()
	{
		return length;
	}
	
	public void setLength(int length)
	{
		this.length=length;
	}
	public Rectangle(int width,int length)
	{
		setWidth(width);
		setLength(length);
	}
	public int getPerimeter()
	{
		return 2*(width+length);
	}
	
	public int getArea()
	{
		return width*length;
	}

	public String toString() {
		return "Rectangle [width="+width+", length="+length+"]";
		
	}
}

class Circle
{
	private int radius;
	
	public int getRadius()
	{
		return radius;
	}
	
	public void setRadius(int radius)
	{
		this.radius=radius;
	}
	
	public Circle(int radius)
	{
		setRadius(radius);
	}
	public int getPerimeter()
	{
		return (int)(2*Math.PI*radius);
	}
	public int getArea()
	{
		return (int)(Math.PI*radius*radius);
	}
	
	public String toString() {
		return "Circle [radius="+radius+"]";
		
	}
}
public class FiveThree {

	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		Rectangle[] Rectangle=new Rectangle[2];
		Circle[] Circle=new Circle[2];
		for(int i=0;i<2;i++)
		{
			int wide=input.nextInt();
			int length=input.nextInt();
			Rectangle[i]=new Rectangle(wide,length);
		}
		for(int i=0;i<2;i++)
		{
			int radius=input.nextInt();
			Circle[i]=new Circle(radius);
		}
		System.out.println(Circle[0].getPerimeter()+Circle[1].getPerimeter()+Rectangle[0].getPerimeter()+Rectangle[1].getPerimeter());
		System.out.println(Circle[0].getArea()+Circle[1].getArea()+Rectangle[0].getArea()+Rectangle[1].getArea());
		
		System.out.println(Arrays.deepToString(Rectangle));
		System.out.println(Arrays.deepToString(Circle));

	}



}

